var net = require('net');
var PORT = 3000;
var HOST = '127.0.0.1';
// tcp客户端
var client = net.createConnection(PORT, HOST);


client.on('connet', function() {
    console.log('客户端：已经和服务端建立了连接')
})
client.on('data', function(data) {
    console.log('客户端：收到服务端的数据', data)
})
client.on('close', function() {
    console.log('客户端:断开了')
})


client.end("我要走了")